package patterns.command;

/**
 * Created by lenovo on 2016/11/30 0030.
 * Order的接口实现类，具体化的操作指令
 */
public class BuyStock implements IOrder {
    private Stock abcStock;//请求

    public BuyStock(Stock stock) {
        this.abcStock = stock;
    }
    //通过持有的stock对象，调用相应的方法
    @Override
    public void execute() {
        abcStock.buy();
    }
}
